<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function f(a, b) {
        console.log(a + b);
      }
      Function.prototype.defer = function (s) {
        return (x, y) => {
          setTimeout(() => {
            this(x, y);
          }, s);
        };
      };
      f.defer(1000)(1, 2); // 1 秒后显示 3
    </script>
  </body>
</html>
